Cant connect to asterisk internal database [on hold]

Posted by Bilbo on Server Fault See other posts from Server Fault or by Bilbo
Published on 2014-08-24T02:09:56Z Indexed on 2014/08/24 4:22 UTC
Read the original article Hit count: 481

Filed under:
|
|
|
|

Im trying to get a PHP script to connect to Asterisks internal mysql database.

I tried the to use the standard method for example

$con = mysqli_connect("192.168.1.126","root","mysql","asterisk");

However when I log into the asterisk server to access the mysql database all i need it to type "mysql" and im logged in.

Im wondering is it possible for my php script to connect to asterisk internal database.

The following error is shown:

Warning: mysqli_connect(): (HY000/2003): Can't connect to MySQL server on '192.168.1.126' (111) in /var/www/html/project/sipSubScript.php on line 6 Failed to connect to MySQL: Can't connect to MySQL server on '192.168.1.126' (111)

© Server Fault or respective owner

Related posts about mysql

Related posts about php